-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add slots to hostfile #523
Conversation
58f4191
to
dd26fa7
Compare
aefd100
to
ec371bd
Compare
pkg/controller/mpi_job_controller.go
Outdated
if mpiJob.Spec.MPIImplementation == kubeflow.MPIImplementationOpenMPI { | ||
buffer.WriteString(fmt.Sprintf("%s%s-%d.%s.%s.svc slots=%d\n", mpiJob.Name, workerSuffix, i, workersService, mpiJob.Namespace, slots)) | ||
} else if mpiJob.Spec.MPIImplementation == kubeflow.MPIImplementationIntel { | ||
buffer.WriteString(fmt.Sprintf("%s%s-%d.%s.%s.svc:%d\n", mpiJob.Name, workerSuffix, i, workersService, mpiJob.Namespace, slots)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenMPI and IntelMPI have different host file formats.
/assign @alculquicondor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
pkg/controller/mpi_job_controller.go
Outdated
for i := 0; i < int(workerReplicas); i++ { | ||
buffer.WriteString(fmt.Sprintf("%s%s-%d.%s.%s.svc\n", mpiJob.Name, workerSuffix, i, workersService, mpiJob.Namespace)) | ||
if mpiJob.Spec.MPIImplementation == kubeflow.MPIImplementationOpenMPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use a switch statement for behavior that varies per enums.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
335363c
to
8b93cd0
Compare
@alculquicondor I have addressed your comments and squashed into one. PTAL. |
/lgtm |
Signed-off-by: Yuki Iwai yuki.iwai.tz@gmail.com
I added slots to the hostfile for the Horovod.
ref: https://horovod.readthedocs.io/en/stable/running_include.html#run-horovod
Fixes: #445